// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   FileKind.java

package include.nseer_cookie;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class FileKind
{

	public FileKind()
	{
	}

	public String[] getKind(String unit_db_name, String table_name, String field_name, String file_ID)
	{
		nseer_db db = new nseer_db(unit_db_name);
		String kind_chain[] = new String[2];
		try
		{
			String sql = (new StringBuilder("select chain_id,chain_name from ")).append(table_name).append(" where ").append(field_name).append("='").append(file_ID).append("'").toString();
			ResultSet rs = db.executeQuery(sql);
			if (rs.next())
			{
				kind_chain[0] = rs.getString("chain_id");
				kind_chain[1] = rs.getString("chain_name");
			}
			db.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return kind_chain;
	}
}
